package com.syh.jn.scm.infrastructure.repository.model.base.upstream;

import com.syh.jn.scm.infrastructure.repository.model.base.support.SuperBusinessEntityModel;
import lombok.*;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 供应商主体
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Entity
@Table(name = "T_BASE_UPSTREAM")
@EqualsAndHashCode(callSuper = true)
public class UpstreamModel extends SuperBusinessEntityModel {
  /**
   * 分类id
   */
  @Column(name = "CATEGORY_ID", columnDefinition = "bigint COMMENT '分类id'")
  private Long categoryId;
  /**
   * 所属种类,应用分类编码
   */
  @Column(name = "CATEGORY_ID_CODE", columnDefinition = "varchar(50) COMMENT '所属种类,应用分类编码'")
  private String categoryIdCode;
  /**
   * 纳税人类型: 1：一般纳税人 2：小规模纳税人 3:其他
   */
  @Column(name = "TAXPAYER", columnDefinition = "smallint COMMENT '纳税人类型: 1：一般纳税人 2：小规模纳税人 3:其他'")
  private Short taxpayer;
  /**
   * 期初应收总额
   */
  @Column(name = "BEGIN_RECEIVE_TOTAL_AMOUNT", columnDefinition = "decimal(19,6) COMMENT '期初应收总额'")
  private BigDecimal beginReceiveTotalAmount;
  /**
   * 期初应付总额
   */
  @Column(name = "BEGIN_PAYMENT_TOTAL_AMOUNT", columnDefinition = "decimal(19,6) COMMENT '期初应付总额'")
  private BigDecimal beginPaymentTotalAmount;

}
